
public class Digui {
	int y;
	int count= 0;
	public Digui(int _y){
		y = _y;
	}
	public void soulut(int[] unsorted){
		int len = unsorted.length;
		int group, i, j, temp;
        for (group = len / 2; group > 0; group /= 2)
        {
            for (i = group; i < len; i++)
            {
                for (j = i - group; j >= 0; j -= group)
                {
                    if (unsorted[j] > unsorted[j + group])
                    {
                        temp = unsorted[j];
                        unsorted[j] = unsorted[j + group];
                        unsorted[j + group] = temp;
                    }
                }
            }
        }
	}
	
	public static void main(String[] args) {
		int[] usort = {6,2,4,9,5,1};
		Digui digui = new Digui(1);
		digui.soulut(usort);
		for (int item : usort)
        {
			System.out.println(item);
        }
		
	}
}
 